import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import tagsView from './modules/tagsView'
import settings from './modules/settings'
import bms from './modules/bms'
import micoapp from './modules/micoapp'
import getters from './getters'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

const store = new Vuex.Store({
  plugins: [
    createPersistedState(
      {
        storage: window.localStorage,
        reducer(val) {
          return {}
        }
      }
    )
  ],
  modules: {
    app,
    bms,
    tagsView,
    micoapp,
    settings
  },
  getters
})

export default store
